﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>MERCHANT CENTER</title>
		<%@ include file="/share/include.jsp" %>
		<!-- <script src="js/jquery.min.js"></script> -->
   		 <meta name="viewport" content="width=device-width, initial-scale=1">
		 <script type="application/x-javascript"> 
			addEventListener("load", function() { 
				setTimeout(hideURLbar, 0); 
			}, false); 
			function hideURLbar(){ 
				window.scrollTo(0,1); 
			} 
		</script>
		<script type="text/javascript">
			function shopDeleteComment(orderId,id,shopId){
				art.dialog({
					width: 250,
					height: 100,
					fixed: true,
				    padding: 0,
				    title: "Prompt",
				    content: "确认删除订单<font style='color:red'>"+orderId+"</font>的用户评价？",
				    lock: true,
				    button: [{
					    name: "确定",
					    callback: function () {
					    	$.ajax({
								 url: "${root }/control/order/commentController/shopDeleteComment.do?commentId="+id,
								 data: {
								 	
								 },
								 type: "post",
								 success: function(data){
						        	if(data=="true"){
						        		var url = '${root }/control/order/commentController/shopCommentList.do?commentShopId='+shopId;
						        		artDalog("提示","删除订单 "+orderId+" 的用户评价成功",url);
						        	}else{
						        		artDalog("错误信息","订单 "+orderId+" 不存在，无法删除评价！",null);
						        	}
						      	}
						   	});
					    },
				        focus: true
				     },
				     {
				        name: "取消"
				     }]
				});
			}
		</script>
	</head>
	<body>
		<!-- container -->
		<!-- header -->
		<div class="header">
			<%@ include file="/control/jsp/layout/header.jsp" %>
			<!-- /bottom-header -->
		</div>
		<!-- header -->
		<!--- top-nav -->
			<%@ include file="/control/jsp/layout/sellerMenu.jsp" %>
		<!--- top-nav -->
		<!-- Product-Details-page -->
		<div class="details-page">
			<div class="content details-page">
				<div class="product-details">
					<div class="container">
						<div class="details-left" style="width: 100%;">
						    <h4 style="color:red;"><img style="padding: 10px;" src="${root}/images/bx.gif" />评价管理</h4>
							<table class="list_order" border="0" align="center" cellpadding="0" cellspacing="2">
							  <thead>
								<tr style="height:40px;">
								  <th>订单号</th>
								  <th>案例</th>
								  <th>用户</th>
								  <th>内容</th>
								  <!-- <th style="text-align: center;width: 60px;">金额</th> -->
								  <th style="text-align: center;width: 130px;">评论时间</th>
								  <!-- <th style="text-align: center;">评价</th> -->
								  <th>操作</th>
								  <th>详情</th>
								</tr>
							  </thead>
							  <tbody style="text-align: center;">
						     	<c:if test="${not empty pageView.records }">
							     	<c:forEach items="${pageView.records }" var="comment">
							  	        <tr style="height: 20px;"></tr>
										<tr style="height: 80px;">
										  <td><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${comment.commentOrderId }&orderShopId=${comment.commentShopId }">${fn:escapeXml(comment.commentOrderId) }</a></td>
										  <td>
										  	<c:if test="${not empty comment.commentCaseId}">
										  		<img width="80" src="${imageService}${comment.casesImagePath}" />
										  	</c:if>
										  	<c:if test="${empty order.orderCaseId}">
										  		
										  	</c:if>
										  </td>
										  <td>${fn:escapeXml(comment.commentUserName) }</td>
										  <td align="center"><span title="${fn:escapeXml(comment.commentContent) }">${fn:escapeXml(comment.commentContent) }</span></td>
										 <!--  <td>$28000</td> -->
										  <td><fmt:formatDate value="${comment.commentCreateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td></td>
										  <%-- <td>${fn:escapeXml(comment.commentContent) }</td> --%>
										  <td><!-- <a class="huifu" style="cursor:pointer;">回复</a> --><a style="margin-left:15px;" href="javascript:shopDeleteComment('${comment.commentOrderId}','${comment.commentId}','${comment.commentShopId}');">删除</a></td>
										  <td><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${comment.commentOrderId }&orderShopId=${comment.commentShopId }">详情</a></td>
										</tr>
							    	</c:forEach>
							    </c:if>
							</tbody>
							</table>
						</div>
						<div class="clearfix"> </div>
					</div>
					<br>
					<!--page-->
					 <%@ include file="/share/pageTwo.jsp" %>
					<!--end page-->
			    </div>
		    </div>
		</div>
		<!-- /Product-Details-page -->
		<!--评价回复-->
		<div class="contact-bottom-grids" style="display:none;position: fixed;z-index: 99;top: 100px;left: 20%;width: 600px;background: rgb(255, 245, 226);border: 1px solid rgb(255, 116, 0);">
			<div class="contact-bottom-grid-right" style="float: none;margin: 0 auto;width: 90%;">
				<h3>评价回复 <span class="close" style="float: right;margin-top: -20px; cursor:pointer;"><img src="${root}/images/010.gif"></span></h3>
				<form>
					<div class="message-fild" style="padding: 1em 0;">
							<span>评价内容:</span>
							<textarea style="min-height: 100px;">XXXXXXXXXXXXXXXXXXXXXXXX </textarea>
					</div>
					<div class="message-fild" style="padding: 1em 0;">
							<span>回复内容:</span>
							<textarea style="min-height: 100px;"> </textarea>
					</div>
					<input style="margin:0 0 10px;float: right;" type="submit" value="回复">
				</form>
			</div>
			<div class="clearfix"> </div>
		</div>
		<!--end 评价回复-->
		<!-- 评价回复 -->
		<script>
			jQuery(document).ready(function($){
			    $('.huifu').click(function(){
					$('.contact-bottom-grids').show();
				});
			
				$('.close').click(function(){
					$('.contact-bottom-grids').hide();
				});

			});
		</script>
		<!--end 评价回复-->
		<!-- footer -->
		<%@ include file="/control/jsp/layout/footer.jsp" %>
</body>
</html>

